var num1 = 10;
var num2 = 20;

function fn1(num,num1){
    num = 100;
    num1 = 100;
    num2 = 100;
    console.log("1-"+num);//10
    console.log("2-"+num1);//100
    console.log("3-"+num2);//100
}

fn1(num1,num2);
console.log("4-"+num1);//100
console.log("5-"+num2);//20

function fn2(){
    console.log(a) //undefined
    var a = 2;
}
fn2()